CMS

How to Install OpenMRS on Ubuntu Linux

Richard
Written by
Richard
May 2, 2023 Updated Apr 17, 2026 2 min read

This article explains how to install and use OpenMRS (Open Medical Record System) on Ubuntu 24.04 LTS. OpenMRS is a free, open-source tool used to manage electronic medical records. It helps organizations save money by avoiding expensive commercial software. It is built using Java and runs through a web browser.

Why OpenMRS?

OpenMRS provides a professional way to track patient health data. It is ideal for clinics and hospitals that need a reliable system without the high cost of proprietary software. When you are done, you will have a functional, web-based medical record system ready for your team to use.

Install OpenMRS on Ubuntu Linux wizard

Install OpenJDK 17 or 21

OpenMRS requires Java to function. We recommend using OpenJDK 17 or 21, as these are the current Long Term Support (LTS) versions. To install OpenJDK 21, run these commands in your terminal:

🐧Bash / Shell
sudo apt update
sudo apt install openjdk-21-jdk

After installing, verify the version by running:

💻Code
java -version

Install MariaDB on Ubuntu Linux

OpenMRS stores its data in a database. We use MariaDB for this purpose. Follow these steps to install the latest stable version on Ubuntu 24.04:

  1. Install the repository helper: sudo apt install software-properties-common
  2. Add the official MariaDB repository to ensure you get the latest stable release.
  3. Run: sudo apt update
  4. Run: sudo apt install mariadb-server

Once installed, start the service:

🐧Bash / Shell
sudo systemctl start mariadb
sudo systemctl enable mariadb

Secure your database by running the setup script:

🐧Bash / Shell
sudo mysql_secure_installation

Follow the on-screen prompts. Use a strong password for your root user. You do not need to change the default authentication method; the standard password-based security is sufficient.

Install OpenMRS on Ubuntu Linux installation type

Deploying OpenMRS

In 2026, the best way to deploy OpenMRS is using the OpenMRS SDK or Docker. Manual deployment of WAR files is no longer recommended because it is difficult to maintain.

Using the OpenMRS SDK

The SDK is a command-line tool that handles the setup for you. It automatically configures the server, database, and settings. It is the fastest way to get a development or testing environment running.

Using Docker

Docker is the preferred way for production environments. It packages OpenMRS and all its dependencies into a single container. This makes it easy to move, backup, and update your system without worrying about conflicts on your server.

To start, install Docker on your Ubuntu machine and pull the official OpenMRS image from the repository. This keeps your system clean and secure.

Install OpenMRS on Ubuntu Linux database

What happens when done?

When you finish your deployment, you will have a fully functional EMR system. You can access the dashboard through your web browser. You can then add users, create patient records, and configure the system to meet your clinic’s specific needs.

Install OpenMRS on Ubuntu Linux admin dashboard

Conclusion

OpenMRS is a powerful, cost-effective tool for managing medical records. By using modern deployment methods like Docker or the OpenMRS SDK on Ubuntu 24.04, you ensure your system is secure and easy to update. If you run into issues, check the official documentation or leave a comment below.

[Y/n] [Y/n] [Y/n] [Y/n] [Y/n] [Y/n] [Unit] [Service] [Install]

Was this guide helpful?

Richard

About the Author

Richard

Tech Writer, IT Professional

Richard, the owner and lead writer at Geek Rewind, is a tech enthusiast passionate about simplifying complex IT topics. His years of hands-on experience in system administration and enterprise IT operations have honed his ability to provide practical insights and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.

Leave a Reply

Your email address will not be published. Required fields are marked *

Exit mobile version